<%--suppress ALL --%>
<%--
  Created by IntelliJ IDEA.
  User: kingry lee
  Date: 2019/12/20
  Time: 17:06
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>注册界面</title>
    <link href="css/style.css" type="text/css" rel="stylesheet" />

</head>

<body class="body_login">
<div class="login_t">
    <div class="login_logo"><a href="" target="_blank" ></a></div>
    <div class="login_title">欢迎登陆</div>

</div>
<div class="zhuce_c">
    <div class="zhuce_ct">
        <span class="tit">注册新用户</span>
        <span class="relex">以下*标注的为必填选项</span>
    </div>
    <div class="zhuce_cb">
        <form action="${pageContext.request.contextPath}/user?method=reg" method="post">
        <dl>
            <dt><span class="red">*</span>账号：</dt>
            <dd><input name="phone" type="text" class="usernames" required placeholder="请输入手机号注册"/></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>密码：</dt>
            <dd><input name="password" type="password" required class="passwords" ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>确认密码：</dt>
            <dd><input type="password" class="passwords" required ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>EMAIL:</dt>
            <dd><input name="email" type="text" required class="texts" ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>QQ</dt>
            <dd><input name="qq" type="text" required class="texts" ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>昵称</dt>
            <dd><input name="nickname" type="text" required class="texts" ></dd>
        </dl>
        <dl>
            <dt>学校</dt>
            <dd><input name="school" type="text" class="texts" ></dd>
        </dl>
        <dl>
            <dt>年级</dt>
            <dd><input name="grade" type="text" class="texts" ></dd>
        </dl>
        <dl>
            <dt>班级</dt>
            <dd><input name="classname" type="text" class="texts" ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>地区：</dt>
            <dd>
                <div>
                    <select id="s_province" required name="province" class="selects"></select>  
                    <select id="s_city" required name="city" class="selects"></select>  
                    <select id="s_county" required name="district" class="selects"></select>
                    <script class="resources library" src="js/area.js" type="text/javascript"></script>

                    <script type="text/javascript">_init_area();</script>
                </div>
                <div id="show"></div>
                <script type="text/javascript">
                    var Gid  = document.getElementById ;
                    var showArea = function(){
                        Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +
                            Gid('s_city').value + " - 县/区" +
                            Gid('s_county').value + "</h3>"
                    }
                    Gid('s_county').setAttribute('onchange','showArea()');
                </script>
            </dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>地址：</dt>
            <dd><input name="address" type="text" required class="texts" ></dd>
        </dl>
        <%--<dl>
            <dt><span class="red">*</span>密码提示问题一：</dt>
            <dd>
                <select name="wt1" class="wt1">
                    <option>您最崇拜的人是谁</option>
                    <option>您父亲的生日是</option>
                    <option>您母亲的生日是</option>
                    <option>您最喜欢的地方是哪里</option>
                </select>
            </dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>密码问题一答案：</dt>
            <dd><input name="texts2" type="text" class="texts" ></dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>密码提示问题二：</dt>
            <dd>
                <select name="wt1" class="wt1">
                    <option>您最崇拜的人是谁</option>
                    <option>您父亲的生日是</option>
                    <option>您母亲的生日是</option>
                    <option>您最喜欢的地方是哪里</option>
                </select>
            </dd>
        </dl>
        <dl>
            <dt><span class="red">*</span>密码问题二答案：</dt>
            <dd><input name="texts4" type="text" class="texts" ></dd>
        </dl>--%>
        <dl>
            <dt></dt>
            <dd>
                <input type="checkbox" value="" class="check0"/>我已阅读并同意<a href="" class="red">《购书网用户注册协议》</a>
            </dd>
        </dl>
        <div class="zc_bt">
            <input type="submit" class="bts"  value="注册"/>
            <input type="reset" class="bts"  value="取消"/>
        </div>
        </form>
        <div class="zc_lj">已经有账号？<a href="login.jsp" target="_blank" class="yellow">立即登陆</a></div>
    </div>
</div>
<div class="footer_m mar38">
    <div class="footer_nav">
        <a href="" target="_blank">关于我们</a>|
        <a href="" target="_blank">联系我们</a>|
        <a href="" target="_blank">人才招聘</a>|
        <a href="" target="_blank">广告服务</a>|
        <a href="" target="_blank">友情链接</a>|
        <a href="" target="_blank">销售联盟</a>|
        <a href="" target="_blank">公司简介</a>
    </div>
    <div class="footer_copyright">
        网络文化经营许可证鄂网文[2015]0278-060号  Copyright © 2015-2018  版权所有
    </div>
</div>
<c:if test="${param.ok == 1}">
    <script>
        alert("注册成功~")
        var time = clearInterval();
        setInterval(function () {
            location.href = "login.jsp";
        }, 2000);
    </script>
</c:if>

<c:if test="${param.ok == 0}">
    <script>
        alert("注册失败~")
    </script>
</c:if>
</body>
</html>